FROM mono:latest
RUN mono --version
WORKDIR /app
ADD server.tar.gz /app
COPY docker-entrypoint.sh /usr/local/bin
COPY wait-for-it.sh /usr/local/bin
RUN chmod +x /usr/local/bin/wait-for-it.sh && \
    chmod +x /usr/local/bin/docker-entrypoint.sh

ENTRYPOINT wait-for-it.sh 192.168.2.208:3306 -s -t 0 -- docker-entrypoint.sh